<template>
	<view class="pageBg">
		<headercard :data="data"></headercard>
		<myorder :data="data"></myorder>
		<optView :userInfo="data"></optView>
		
	</view>
</template>

<script>
	import optView from '@/components/my/optView/optView.vue';
	import myfuture from '@/components/my/myfuture/myfuture.vue';
	import headercard from '@/components/my/headercard/headercard.vue';
	import myorder from '@/components/my/myorder/myorder.vue';
	
	export default {
		components: { myorder, optView, headercard, myfuture, },
		data() {
			return {
				data: {},
			};
		},
		onShow() {
			this.init();
		},
		methods: {
			async init() {
				const { data } = await this.$api.Usercenter();
				uni.setStorageSync('loginData', data);
				this.data = data;
			},
		},
	};
</script>

<style lang="scss" scoped>
	.pageBg {
	}
</style>
